package com.cell.service.user;

import com.cell.pojo.entity.user.pointaccount.UserPointAccount;
import com.baomidou.mybatisplus.extension.service.IService;
import com.cell.pojo.entity.user.pointaccount.UserPointOperate;

import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author cloudJiang
 * @since 2022-06-04
 */
public interface IUserPointAccountService extends IService<UserPointAccount> {

    /**
     * 兑换商品，兑换完成后商品库存减一。
     *
     * @param pointAccountId
     * @param productId
     */
    void redeemProduct(Long pointAccountId, Long productId);

    /**
     * 根据账户id来获取相应记录，查询条件有operate
     *
     * @param accountId
     * @param operate
     * @return
     */
    List<Object> getOperateHistory(Long accountId, String operate);

    /**
     * 将记录删除
     *
     * @param operateId 待删除的记录
     */
    void deletePointOperate(Long operateId);
}
